# import time
# import socket
# sk=socket.socket()
# sk.connect(('127.0.0.1',9001))
# time.sleep(0.1)
# msg1=sk.recv(1024)
# print(msg1.decode())# b'hellozlex' 粘包现象
# msg2=sk.recv(1024)
# print(msg2.decode())
#
#
# sk.close()

################
# import time
# import socket
# sk=socket.socket()
# sk.connect(('127.0.0.1',9001))
# lenth=int(sk.recv(4).decode('utf-8'))
# print(lenth)
# time.sleep(0.1)
# msg1=sk.recv(lenth)
# print(msg1.decode())# b'hellozlex' 粘包现象
# msg2=sk.recv(1024)
# print(msg2.decode())
# sk.close()
import socket
import time
sk=socket.socket()
sk.connect(('127.0.0.1',9001))
lenth=int(sk.recv(4).decode('utf-8'))
print(lenth)
time.sleep(0.1)

msg1=sk.recv(lenth)
msg2=sk.recv(1024)
print(msg1.decode('utf-8'))
print(msg2.decode('utf-8'))

sk.close()








